<template>
	<view class="introduction flex-d-c">
		<!-- 项目详情 start-->
		<view class="profile-wrap flex-over ">
			
			<block v-for="(item,index) in list" :key="index">
				<view class="profile-box flex-d-c" v-show="item.label && item.project">
					<view class="t">{{item.label}}</view>
					<view class="flex-1 c"  v-if="index!==5">{{item.project}}</view>
					<template v-if="index==5"> 
						<view class="flex-1 c" v-for="(val,j) in item.project" :key="j">{{val}}</view>
					</template>
				</view>
			</block>
			
		</view>
		
		
		<!-- 项目详情 end-->
	</view>
</template>
<script>
	export default{
		data(){
			return{
				projectList: this.$store.state.projectList,
				project: '',
				labelTitle:'',
				list:[]
			}
		},
		onLoad(option){
			console.log('1111')
			console.log(JSON.parse(option.val))
			const val = JSON.parse(option.val);
			this.project = val.project;
			this.labelTitle  = val.label;
			uni.setNavigationBarTitle({
				title: val.project
			})
			this.listFormat()
		},
		methods:{
			listFormat(){
				let index = 0;
				this.projectList.forEach((item)=>{
					item.forEach((val,index)=> {
						if(val.project == this.project && val.label == this.labelTitle){
							// if(val.label== '责任描述'){
								// console.log('===sadasda=======',item)
								item[5].project = item[5].project.split(/\s/g)
								console.log(item[5].project )
							// }
							this.list = item;
						}
					})
					
				})
			
			}
		}
	}
</script>
<style lang="scss">
	page{
		height: 100%;
	}
	.introduction{
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		padding: 44upx 36upx 58upx;
		background-color: #2252B6;
		.profile-wrap{
			width: 100%;
			box-sizing: border-box;
			padding: 50upx;
			background-color: #fff;
			box-shadow: 0 4upx 8upx 0 #092C7F;
			border-radius: 16upx;
			.profile-box{
				margin: 20upx 0;
			}
			.t{
				margin-right: 20upx;
				font-weight: 600;
				font-size: 32upx;
				color: #5991FF;
			}
			.c{
				margin-top: 20upx;
				font-size: 24upx;
				color: #000000;
				text-indent: 2em;
			}
		}
	}
</style>